const path = require('path')

module.exports = {
    dev: {
        // 静态资源路径，文件编译后输出路径
        assetsSubPath:path.resolve(__dirname, '../dist'),
        assetsPublicPath:'',// 编译发布的根目录，最后会被写到 HTML 中，可以是服务器域名  
        
        filename:'js/[name].bundle.js',
        proxy:{ // proxy URLs to backend development server
            '/apis': {
              target: 'http://localhost:3000',
              changeOrigin: true,
              pathRewrite: {'^/api' : ''}
            }
        },
        port:8041,
    },
    prod:{
        assetsSubPath:path.resolve(__dirname, '../dist'),
        assetsPublicPath:'/',//编译后Html引用资源的前缀
        // 二级路径、图片、音视频等媒体资源路径
        assetsSubDirectory:path.resolve(__dirname, '../dist/static'),
        filename:'js/[name].[hash].js',
    }
}